/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.net.entitybean;

import java.io.Serializable;
import java.sql.Date;


import oracle.jdbc.OracleTypes;
import queenb.net.annotation.Mapping;
import queenb.net.datacontrol.DataControl;
import queenb.web.util.ResourcesProvider;

/**
 *
 * @author ems
 */
public class M650 extends DataControl<M650> implements Serializable {

    @Mapping(name = "pm650", typeMapping = OracleTypes.INTEGER)
    private int pm650;
    @Mapping(name = "fn100", typeMapping = OracleTypes.INTEGER)
    private int fn100;
    @Mapping(name = "ni104", typeMapping = OracleTypes.INTEGER)
    private int ni104;
    @Mapping(name = "mn658", typeMapping = OracleTypes.INTEGER)
    private int mn658;
    @Mapping(name = "mv653", typeMapping = OracleTypes.CHAR)
    private String mv653;
    @Mapping(name = "mv652", typeMapping = OracleTypes.CHAR)
    private String mv652;
    @Mapping(name = "mv651", typeMapping = OracleTypes.CHAR)
    private String mv651;
    @Mapping(name = "mv660", typeMapping = OracleTypes.CHAR)
    private String mv660;
    @Mapping(name = "ml668", typeMapping = OracleTypes.DATE)
    private Date ml668;
    @Mapping(name = "ml668", typeMapping = OracleTypes.CHAR)
    private String ml668Str;
    @Mapping(name = "ml669", typeMapping = OracleTypes.CHAR)
    private String ml669;
    @Mapping(name = "FV001", typeMapping = OracleTypes.CHAR)
    private String fv001;
    private String download;
    @Mapping(name = "hoten", typeMapping = OracleTypes.CHAR)
    private String hoten;
    @Mapping(name = "nv109", typeMapping = OracleTypes.CHAR)
    private String nv109;
    @Mapping(name = "vv051", typeMapping = OracleTypes.CHAR)
    private String vv051;
    @Mapping(name = "rowss", typeMapping = OracleTypes.INTEGER)
    private int rowss;
    private String linkview;
    private int idLink;

    /**
     * @return the pm650
     */
    public int getPm650() {
        return pm650;
    }

    /**
     * @param pm650 the pm650 to set
     */
    public void setPm650(int pm650) {
        this.pm650 = pm650;
    }

    /**
     * @return the mv653
     */
    public String getMv653() {
        return mv653;
    }

    /**
     * @param mv653 the mv653 to set
     */
    public void setMv653(String mv653) {
        this.mv653 = mv653;
    }

    /**
     * @return the mv652
     */
    public String getMv652() {
        return mv652;
    }

    /**
     * @param mv652 the mv652 to set
     */
    public void setMv652(String mv652) {
        this.mv652 = mv652;
    }

    /**
     * @return the mv660
     */
    public String getMv660() {
        return mv660;
    }

    /**
     * @param mv660 the mv660 to set
     */
    public void setMv660(String mv660) {
        this.mv660 = mv660;
    }

    /**
     * @return the download
     */
    public String getDownload() {
        //   System.out.println("----xem ne-------"+getMv653());
        download = ResourcesProvider.getDownloadFolder(getMv653());

        //  System.out.println("----xem ne----aaaaaaaa---"+download);
        return download;
    }

    /**
     * @param download the download to set
     */
    public void setDownload(String download) {
        this.download = download;
    }

    /**
     * @return the ml668
     */
    public Date getMl668() {
        return ml668;
    }

    /**
     * @param ml668 the ml668 to set
     */
    public void setMl668(Date ml668) {
        this.ml668 = ml668;
    }

    /**
     * @return the mv651
     */
    public String getMv651() {
        return mv651;
    }

    /**
     * @param mv651 the mv651 to set
     */
    public void setMv651(String mv651) {
        this.mv651 = mv651;
    }

    /**
     * @return the ml669
     */
    public String getMl669() {
        return ml669;
    }

    /**
     * @param ml669 the ml669 to set
     */
    public void setMl669(String ml669) {
        this.ml669 = ml669;
    }

    /**
     * @return the mn658
     */
    public int getMn658() {
        return mn658;
    }

    /**
     * @param mn658 the mn658 to set
     */
    public void setMn658(int mn658) {
        this.mn658 = mn658;
    }

    /**
     * @return the fv001
     */
    public String getFv001() {
        return fv001;
    }

    /**
     * @param fv001 the fv001 to set
     */
    public void setFv001(String fv001) {
        this.fv001 = fv001;
    }

    /**
     * @return the hoten
     */
    public String getHoten() {
        return hoten;
    }

    /**
     * @param hoten the hoten to set
     */
    public void setHoten(String hoten) {
        this.hoten = hoten;
    }

    /**
     * @return the nv109
     */
    public String getNv109() {
        return nv109;
    }

    /**
     * @param nv109 the nv109 to set
     */
    public void setNv109(String nv109) {
        this.nv109 = nv109;
    }

    /**
     * @return the vv051
     */
    public String getVv051() {
        return vv051;
    }

    /**
     * @param vv051 the vv051 to set
     */
    public void setVv051(String vv051) {
        this.vv051 = vv051;
    }

    /**
     * @return the ml668Str
     */
    public String getMl668Str() {

        return ml668Str;
    }

    /**
     * @param ml668Str the ml668Str to set
     */
    public void setMl668Str(String ml668Str) {
        this.ml668Str = ml668Str;
    }

    /**
     * @return the fn100
     */
    public int getFn100() {
        return fn100;
    }

    /**
     * @param fn100 the fn100 to set
     */
    public void setFn100(int fn100) {
        this.fn100 = fn100;
    }

    /**
     * @return the ni104
     */
    public int getNi104() {
        return ni104;
    }

    /**
     * @param ni104 the ni104 to set
     */
    public void setNi104(int ni104) {
        this.ni104 = ni104;
    }

    /**
     * @return the rowss
     */
    public int getRowss() {
        return rowss;
    }

    /**
     * @param rowss the rowss to set
     */
    public void setRowss(int rowss) {
        this.rowss = rowss;
    }

    /**
     * @return the linkview
     */
    public String getLinkview() {
      
        return linkview;
    }

    /**
     * @param linkview the linkview to set
     */
    public void setLinkview(String linkview) {
        this.linkview = linkview;
    }

    /**
     * @return the idLink
     */
    public int getIdLink() {
         String con2 = "docx";
            String con1 = "doc";
         String conpdf = "pdf";
       boolean dk = mv653.endsWith(con2);
        boolean dk1 = mv653.endsWith(conpdf);
         boolean dk2 = mv653.endsWith(con1);
       if(dk == true || dk1 == true || dk2 == true){
           idLink = 1;
           System.out.println("--------------vao day---"+idLink);
       }else{
           idLink = 0;
           System.out.println("--------------vao day--AAA-"+idLink);
       }
        return idLink;
    }

    /**
     * @param idLink the idLink to set
     */
    public void setIdLink(int idLink) {
        this.idLink = idLink;
    }
}
